<template>
  <div class="financial">
  
  <div class="banner">
  <div class="detailed" @click="goDetail">明细</div>
  <div class="info">
    账户余额(元)：<br/>
      <span class="amount">{{parseFloat(balance).toFixed(2)}}</span>
  </div>
  </div>
    <div class="tabs-box">
      <!--<div class="tabs" @click="gocharge">-->
        <!--<div>-->
          <!--<img-->
            <!--src="../../assets/images/bsc.png"-->
            <!--alt=""-->
          <!--&gt;-->
          <!--<span>充值</span>-->
        <!--</div>-->
        <!--<div><i class="icon iconfont icon-xiangyou"></i></div>-->
      <!--</div>-->
      <div class="tabs" @click="goCash">
        <div>
          <img
            src="../../assets/images/47.png"
            alt=""
          >
          <span>提现</span>
        </div>
        <div><i class="icon iconfont icon-xiangyou"></i></div>
      </div>
      <!--<div class="tabs">-->
        <!--<div>-->
          <!--<img-->
            <!--src="../../assets/images/zz02.png"-->
            <!--alt=""-->
          <!--&gt;-->
          <!--<span>转账</span>-->
        <!--</div>-->
        <!--<div><i class="icon iconfont icon-xiangyou"></i></div>-->
      <!--</div>-->

    </div>
  </div>
</template>
<script>
import myHeader from "../header/index.vue";
import { getUserInfo } from "../../api/user";
getUserInfo
export default {

  data() {
    return {
      balance:0.00,
    };
  },
  methods: { 
    goCash() {
      this.$router.push({
        path: "/cash"
      });
    },
    goDetail() {
      this.$router.push({
        path: "/wallet"
      });
    },
    gocharge(){
      this.$router.push({
        path: "/rechargeAccount"
      });
    },
    getUserAccount(){
      getUserInfo().then(res => {
        this.balance = res.data.info.money;
      });
    }
  },
  created(){
    this.getUserAccount();
  }
};

</script>

<style lang="scss">
.financial {
  width: 100%;
  overflow-x: hidden;
  // height: 100%;
  background-color: #f5f5f5;
  padding-bottom: 48px;
  .banner{
    width: 100%;
    height: 180px;
    background-image: linear-gradient(160deg, #fd2039 20%,#f79971 80%);
    position: relative;
    left: 0;
    background-color: #f5f5f5;
    top: 0;
    color:#FFF; 
    font-size:14px;
    font-weight:300;
    .detailed{
      float:right;
      padding: 15px 15px; 
    }
    .info{ 
       padding: 55px 15px; 
      .amount{ 
        font-size:50px;
        font-weight:400;
      }
    }
  }
  .tabs-box {
    width: 100%;
    margin-top: 10px;
    .tabs {
      margin-bottom: 10px;
      width: 100%;
      height: 48px;
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
      padding: 0 15px;
      background-color: #fff;
      border-bottom: 1px solid #eee;
      img {
        vertical-align: middle;
        width: 20px;
      }
      span {
        vertical-align: middle;
        padding-left: 10px;
        font-size: 14px;
      }
    }
  }
}
</style>


